******************************************************************************************* Comanda: md Creates a directory. MKDIR [drive:]path MD [drive:]path ******************************************************************************************* Comanda: cd Displays the name of or changes the current directory. CHDIR [drive:][path] CHDIR[..] CD [drive:][path] CD[..] .. Specifies that you want to change to the parent directory. Type CD drive: to display the current directory in the specified drive. Type CD without parameters to display the current drive and directory. ******************************************************************************************* Comanda: rd Removes (deletes) a directory. RMDIR [drive:]path RD [drive:]path ******************************************************************************************* Comanda: dir Displays a list of files and subdirectories in a directory. DIR [drive:][path][filename] [/P] [/W] [/A[[:]attributes]] [/O[[:]sortorder]] [/S] [/B] [/L] [/V] [/4] [drive:][path][filename] Specifies drive, directory, and/or files to list. (Could be enhanced file specification or multiple filespecs.) /P Pauses after each screenful of information. /W Uses wide list format. /A Displays files with specified attributes. attributes D Directories R Read-only files H Hidden files A Files ready for archiving S System files - Prefix meaning not /O List by files in sorted order. sortorder N By name (alphabetic) S By size (smallest first) E By extension (alphabetic) D By date & time (earliest first) G Group directories first - Prefix to reverse order A By Last Access Date (earliest first) /S Displays files in specified directory and all subdirectories. /B Uses bare format (no heading information or summary). /L Uses lowercase. /V Verbose mode. /4 Displays year with 4 digits (ignored if /V also given). Switches may be preset in the DIRCMD environment variable. Override preset switches by prefixing any switch with - (hyphen)--for example, /-W. ******************************************************************************************* Comanda: copy Copies one or more files to another location. COPY [/A | /B] source [/A | /B] [ source [/A | /B] [ ...]] [destination [/A | /B]] [/V] [/Y | /-Y] source Specifies the file or files to be copied. /A Indicates an ASCII text file. /B Indicates a binary file. destination Specifies the directory and/or filename for the new file(s). /V Verifies that new files are written correctly. /Y Suppresses prompting to confirm you want to overwrite an existing destination file. /-Y Causes prompting to confirm you want to overwrite an existing destination file. The switch /Y may be preset in the COPYCMD environment variable. This may be overridden with /-Y on the command line To append files, specify a single file for destination, but multiple files for source (using wildcards or file1 file2 file3 format). ******************************************************************************************* Comanda: ren Renames a file/directory or files/directories. RENAME [drive:][path][directoryname1 | filename1] [directoryname2 | filename2] REN [drive:][path][directoryname1 | filename1] [directoryname2 | filename2] Note that you cannot specify a new drive or path for your destination. ******************************************************************************************* Comanda: type Displays the contents of text files. TYPE [drive:][path]filename ******************************************************************************************* Comanda: del Deletes one or more files. DEL [drive:][path]filename [/P] ERASE [drive:][path]filename [/P] [drive:][path]filename Specifies the file(s) to delete. Specify multiple files by using wildcards. /P Prompts for confirmation before deleting each file. ******************************************************************************************* Comanda: if Performs conditional processing in batch programs. IF [NOT] ERRORLEVEL number command IF [NOT] string1==string2 command IF [NOT] EXIST filename command NOT Specifies that DOS 7.1 should carry out the command only if the condition is false. ERRORLEVEL number Specifies a true condition if the last program run returned an exit code equal to or greater than the number specified. command Specifies the command to carry out if the condition is met. string1==string2 Specifies a true condition if the specified text strings match. EXIST filename Specifies a true condition if the specified filename exists. ******************************************************************************************* Comanda: for Runs a specified command for each file in a set of files. FOR %variable IN (set) DO command [command-parameters] %variable Specifies a replaceable parameter. (set) Specifies a set of one or more files. Wildcards may be used. command Specifies the command to carry out for each file. command-parameters Specifies parameters or switches for the specified command. To use the FOR command in a batch program, specify %%variable instead of %variable. ******************************************************************************************* Comanda: rem Records comments (remarks) in a batch file or CONFIG.SYS. REM [comment] ******************************************************************************************* Comanda: set Displays, sets, or removes DOS 7.1 environment variables. SET [variable=[string]] variable Specifies the environment-variable name. string Specifies a series of characters to assign to the variable. Type SET without parameters to display the current environment variables. ******************************************************************************************* Comanda: shift Changes the position of replaceable parameters in a batch file. SHIFT ******************************************************************************************* Comanda: echo Displays messages, or turns command-echoing on or off. ECHO [ON | OFF] ECHO [message] Type ECHO without parameters to display the current echo setting. ******************************************************************************************* Comanda: break Sets or clears extended CTRL C checking. BREAK [ON | OFF] Type BREAK without a parameter to display the current BREAK setting. ******************************************************************************************* Comanda: prompt Changes the DOS 7.1 command prompt. PROMPT [text] text Specifies a new command prompt. Prompt can be made up of normal characters and the following special codes: $Q = (equal sign) $$ $ (dollar sign) $T Current time $D Current date $P Current drive and path $V MS-DOS version number $N Current drive $G > (greater-than sign) $L < (less-than sign) $B | (pipe) $H Backspace (erases previous character) $E Escape code (ASCII code 27) $_ Carriage return and linefeed Type PROMPT without parameters to reset the prompt to the default setting.